import java.util.HashMap;

public class lk03 {
    public static void main(String[] args) {
        
    }
    public int findRepeatNumber(int[] nums) {
        int n=nums.length;
        HashMap hp = new HashMap<>();
        for(int i=0;i<n;i++){
            if(!hp.containsKey(nums[i])){
                hp.put(nums[i], i);
            }else {
                return nums[i];
            }
            
        }
        return -1;
    }
}
